package com.example.slidermenu;

import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;

import android.annotation.SuppressLint;
import android.app.Fragment;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
 
@SuppressLint({ "NewApi", "SimpleDateFormat" })
public class TicketBuyFragment extends Fragment {
	private TextView textDate;
	
	public TicketBuyFragment(){}
     
    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
            Bundle savedInstanceState) {
  
        View rootView = inflater.inflate(R.layout.fragment_ticketbuy, container, false);
        textDate = (TextView) rootView.findViewById(R.id.textViewValid);

     // Time and Date
     		DateFormat date = new SimpleDateFormat("dd/MM/yyyy");
     		Date d = new Date();
     		String dateString = date.format(d);

     		textDate.setText("Giltig: 10:30 - 11:30 " + "    " + dateString);
        return rootView;
    }
 
}